Cookie.prototype.set_cookie = function(name, value) {
	document.cookie = name + "=" + escape(value);
}

Cookie.prototype.get_cookie = function(name) {
	var ret = "";
	var strCookie = document.cookie;
	var arrCookie = strCookie.split("; ");
	for ( var i = 0; i < arrCookie.length; i++) {
		var arr = arrCookie[i].split("=");
		if (name == arr[0]) {
			ret = unescape(arr[1]);
			break;
		}
	}
	return ret;
}

Cookie.prototype.del_cookie = function(name) {
	var exp = new Date();
	exp.setTime(exp.getTime() - 1);
	var cval = GetCookie(name);
	if (cval != null && cval != "")
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}